export default {
  computed: {
    columns() {
      return [
        {
          key: "sf_code",
          title: {
            "zh-CN": "部门编码",
            "en-US": "sf_code",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          show: true,
        },
        {
          key: "sf_name",
          title: {
            "zh-CN": "部门名称",
            "en-US": "sf_name",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          show: true,
        },
        {
          key: "brevity",
          title: {
            "zh-CN": "部门简码",
            "en-US": "brevity",
          }[this.G_Locale],
          minWidth: 70,
          align: "center",
          show: true,
        },
        {
          key: "leader",
          title: {
            "zh-CN": "负责人",
            "en-US": "leader",
          }[this.G_Locale],
          minWidth: 70,
          align: "center",
          show: true,
        },
        {
          key: "remark",
          title: {
            "zh-CN": "备注",
            "en-US": "remark",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          show: true,
        },
      ];
    },
    // form中列字段
    formColumns() {
      return [
        {
          key: "sf_code",
          title: {
            "zh-CN": "部门编码",
            "en-US": "sf_code",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "text" },
        },
        {
          key: "sf_name",
          title: {
            "zh-CN": "部门名称",
            "en-US": "sf_name",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "text" },
        },
        {
          key: "brevity",
          title: {
            "zh-CN": "部门简码",
            "en-US": "brevity",
          }[this.G_Locale],
          minWidth: 70,
          align: "center",
          config: { type: "text" },
        },
        {
          key: "leader",
          title: {
            "zh-CN": "负责人",
            "en-US": "leader",
          }[this.G_Locale],
          minWidth: 70,
          align: "center",
          config: { type: "link", link: this.selectLeader },
        },
        {
          key: "remark",
          title: {
            "zh-CN": "备注",
            "en-US": "remark",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "textarea" },
        },
      ];
    },
    lang() {
      return {
        "en-US": {
          confirmDelete: "confirm delete",
          cancel: "cancel",
        },
        "zh-CN": {
          confirmDelete: "删除确认",
          cancel: "取消",
        },
      }[this.G_Locale];
    },
  },
};
